<x-layout>


  <!---->
  <div class="m-wrap g-ld invite-box">
    <div class="m-box">

      <div class="m-c wow fadeInUp">

        <div class="finance-header">
          <div class="item"><a href="{{url('/finance')}}" class="active1">销毁记录</a></div>
          <div class="item"><a href="{{url('/finance2')}}">收益明细</a></div>
          <div class="item"><a href="{{url('/finance3')}}">提款记录</a></div>
        </div>

        <div class="finance-list" id="box">
          <div class="f-box f-line">
            <div class="item">时间</div>
            <div class="item">T算力</div>
            <div class="item">已收益</div>
          </div>


        </div>

      </div>
    </div>
  </div>


</x-layout>
<!--partner-->
<script>
  var page = 1;

  function fetchNext(token, page) {
    axios.post(mgRoute.dRecord, {
      "current": page || 1,
      "size": 10
    }, {
      headers: {
        token: token
      }
    }).then((r) => {
      var d = r.data
      if (d.status == 200) {
        j = d.data

        items = j.list
        if (items.length > 0) {
          page++;

          var line = '';
          var len = items.length;
          for (i = 0; i < len; i++) {
            line += '<div class="f-box"><div class="item light">' +
              items[i].createTime + '</div><div class="item light">' +
              items[i].number + '</div><div class="item light">' +
              items[i].toGain + '</div></div>'
          }

          if (line) {
            $("#box").append(line);
          }
        }

      } else {
        alert("请求失败")
      }
    }).catch((e) => {
      dlog(e)
    })

  }
  $(function() {

    token = mgToken()

    fetchNext(token, page);

  })
</script>